-- GENERATED SPELL FOR [Enraged Air Spirit] --


function spell0_21060(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21060', 3000, 1)
end

function spell1_21060(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21060', 559, 1)
end

function spell2_21060(pUnit, Event) --@Hurricane,n/a--
pUnit:FullCastSpellOnTarget(32717,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21060', 10000, 1)
end

function Sorts_21060(pUnit, Event)
local choix_sorts_21060 = math.random(0, 2)
if choix_sorts_21060 == 0 then
pUnit:RegisterEvent('spell0_21060', 1, 1)
end
if choix_sorts_21060 == 1 then
pUnit:RegisterEvent('spell1_21060', 1, 1)
end
if choix_sorts_21060 == 2 then
pUnit:RegisterEvent('spell2_21060', 1, 1)
end
end

function mob21060_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21060', math.random(1500, 3000), 1)
end

function mob21060_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21060_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21060_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21060, 1, 'mob21060_Action')
RegisterUnitEvent(21060, 2, 'mob21060_Leave')
RegisterUnitEvent(21060, 3, 'mob21060_Kill')
RegisterUnitEvent(21060, 4, 'mob21060_Die')
